package md.com.text;

import java.util.Scanner;

import javax.xml.stream.events.EndDocument;

public class Demo01 {

	public static void main(String[] args) {

		int score[]=new int[6];
		for (int i = 0; i < score.length; i++) {
			
				Scanner scanner = new Scanner(System.in);
				System.out.println("第"+(i+1)+"个评委打分");
				score[i]=scanner.nextInt();
				
				if (score[i]<0 || score[i]>100) {
					System.out.println("请输入0-100的数");
					i=i-1;
				}else {
					System.out.println("已录入");	
				}			
		}
		int max=score[0];
		int min = score[0];
		int sum = 0;

			for (int i = 0; i < score.length; i++) {
				
					if (max<score[i]) {
						max=score[i];
					}
					if (min>score[i]) {
						min=score[i];
					}
					sum=sum+score[i];
				}
			System.out.println("最大值为"+max);
			System.out.println("最小值为"+min);
			System.out.println("总和为"+sum);
			System.out.println("平均分为"+(sum-max-min)/4);
			}
				
				
		}